<template>
  <div class="main-container">
    <el-row>
      <el-col :span="2">{{ fieldName }}</el-col>
      <el-col :span="5">
        <el-input v-model="fieldVal"></el-input>
      </el-col>
    </el-row>
    <el-row v-for="field in fieldConfig">
      <el-col :span="2">{{ field.fieldName }}</el-col>
      <el-col :span="5">
        <el-input v-model="field.fieldVal"></el-input>
      </el-col>
    </el-row>
  </div>
</template>
<script setup lang="ts">
import {inject, ref} from "vue";

const props = defineProps({
  fieldName: {type: String, default: ""}
});

const fieldVal = inject("fieldVal");
const fieldConfig = inject<any>("fieldConfig");
</script>
<style scoped lang="scss">
.main-container {
  margin: 20px;
}
</style>
